<!-- template放HTML script放JS style放CSS -->
<!-- 注意：script标签上必须得有setup属性！-->
<template>

  <h1>我们的第一个Vue组件Component</h1>

  <p>{{info}}</p>
  <h4>{{info}}</h4>
  {{info+'下午好'}}
  <button @click="f()">按钮</button>
  <hr>
  <p>{{count}}</p>
  <button @click="f1()">点我加一</button>
  <hr>
  <p>{{a}}</p>
  <p v-text="a"></p>
  <p v-html="a"></p>
</template>

<script setup>

    import {ref} from "vue";

    //1.定义响应式变量
    const info = ref('我是info66666');

    const f = () => {
      console.log(info.value);
      info.value = '我是新值';
    }
    const count = ref(0);
    const f1 = () => {
      count.value++;
    }
    //4.vue文本指令的区别
    const a = ref('今天是星期二，晚上有<mark>月考</mark>')
</script>





<style scoped>

</style>